<div class="role-mapping-content">
    <div class="row entity-swapper">
        <div class=" col-md-4 col-md-offset-2">
            <div class="btn-group" ng-model="entityType" bs-radio-group>
                <label class="btn btn-default"><input type="radio" class="btn btn-default" value="user"> Users</label>
                <label class="btn btn-default"><input type="radio" class="btn btn-default" value="group"> Groups</label>
                <label class="btn btn-default"><input type="radio" class="btn btn-default" value="role"> Roles</label>
            </div>

        </div>
    </div>
    <div class="row">
        <div class=" col-md-4 ">
            <div class="mapping-header">
                <div class="mapping-title"> {{titleOfTable}}</div>
                <div class="mapping-search">
                    <input type="search" ng-model="entityFilter"/>
                </div>
            </div>

        </div>
    </div>
    <div class="row entity-mapping">
        <div class="col-md-3 table-grid">
            <table class="entity-mapping-table" ondblclick="">
                <tr ng-repeat="entity in entities |ldapEntitySearch:entityFilter:selectedEntity track by entity.name"
                    ng-class="isEntitySelected(entity) && 'selected'" ng-click="selectEntity(entity)">
                    <td class="entity-name-col"> {{entity.name}}</td>
                </tr>
            </table>
        </div>

        <div class=" col-md-8 col-md-offset-1 table-grid" ng-switch="entityType">
            <div ng-switch-default>
                <table class="assignment-list-table" ondblclick="">
                    <tr ng-repeat="assignment in assignments track by assignment.id" >
                        <td class="entity-name-col" > {{assignment.role.name}} - {{assignment.classification.type}}:{{assignment.classification.name}}</td>
                        <td class="entity-name-col" ng-click="deleteAssignment(assignment)">delete <i></i></td>
                    </tr>
                </table>
            </div>

            <div ng-switch-when='role'>
                <table class="assignment-list-table" ondblclick="">
                <tr ng-repeat="assignment in assignments track by assignment.id" >
                    <td class="entity-name-col" > {{assignment.ldapEntity.name}} - {{assignment.ldapEntity.type}}:{{assignment.classification.name}}</td>
                    <td class="entity-name-col" ng-click="deleteAssignment(assignment)">delete <i></i></td>
                </tr>
                </table>
            </div>

        </div>
    </div>
</div>